package org.example;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.sql.SQLException;

@Configuration
public class DataMigrationConfig {
    @Bean
    public ExcelReader excelReader() {
        return new ExcelReader();
    }

    @Bean
    public DatabaseManager databaseManager() throws SQLException {
        DatabaseManager databaseManager = new DatabaseManager();
        databaseManager.connect("mysql", "10.155.2.17", "13306", "ceprei-cloud-xz-data-test", "ceprei_cloud_dev", "Isuperone#123");
        return databaseManager;
    }

    @Bean
    public MappingRuleDAO mappingRuleDAO() throws SQLException {
        return new MappingRuleDAO(databaseManager().getConnection());
    }

//    @Bean
//    public DataTransformationService dataTransformationService() {
//        return new DataTransformationService();
//    }

//    @Bean
//    public DataMigrationService dataMigrationService() {
//        return new DataMigrationService();
//    }

//    @Bean
//    public ConfigPersistenceService configPersistenceService() {
//        return new ConfigPersistenceService();
//    }
}